import Carousel from '../../../components/Carousel';
import useFetch from '../../../hooks/useFetch';

const Recommendation = ({ mediaType, id }: any) => {
  const { data, loading, error } = useFetch(`/${mediaType}/${id}/recommendations`);

  return (
    <Carousel title="推荐" data={data?.results} loading={loading} endpoint={mediaType} />
  );
};

export default Recommendation;
